using System;
using System.Collections;
using System.Web;

namespace Sedna.Core.Controller
{
	/// <summary>
	/// an entry point interface for action execution service.
	/// Its job includes looking up a corresponding action and trying to execute it.
	/// If an execution fails, the responsibility of an executor service is to look up
	/// appropriate execption handler (by matching a raised exeption by type using <see cref="IExceptionHandlerMatcher"/>)
	/// and invoking that corresponding <see cref="IExceptionHandler"/>.
	/// If no corresponding action is found an executor must stop the execution chain and return control
	/// to its invoker.
	/// </summary>
	public interface IActionExecutor
	{
		object ExecuteAction(IExecutionContext executionContext, string currentScopePrefix);
		object ExecuteAction(IExecutionContext executionContext, IConfiguration configuration, string currentScopePrefix);
		object ExecuteAction(IExecutionContext executionContext, IConfiguration configuration, string currentScopePrefix, string actionName);
//        IExceptionHandler LookupExceptionHandler(IConfiguration configuration, Exception exception);
        object HandleException(IExecutionContext executionContext, IConfiguration configuration, Exception exception);
	}
}
